package cn.wolfcode.crm.web.controller;

import cn.wolfcode.crm.query.InPayQueryObject;
import cn.wolfcode.crm.service.IInPayService;
import com.alibaba.fastjson.JSON;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("inpay")
public class InPayController {

    @Autowired
    private IInPayService inPayService;

    @RequestMapping("view")
    public String view() throws Exception{
        return "inpay/inpay";
    }

    @RequestMapping("list")
    @ResponseBody
    public Object list(InPayQueryObject qo) throws Exception{
        return JSON.toJSON(inPayService.query(qo));
    }
}
